package com.vito.demo.sb1

import org.springframework.boot.SpringApplication
import org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration
import java.util.*

/**
 * Created by lingzhiyuan.
 * Date : 16/3/31.
 * Time : 下午2:48.
 * Description:
 *
 */
@SpringBootApplication(exclude = arrayOf(SecurityAutoConfiguration::class,
                                         DataSourceAutoConfiguration::class, HibernateJpaAutoConfiguration::class, ManagementWebSecurityAutoConfiguration::class))
open class AppStarter {

    companion object {
        @JvmStatic fun main(args: Array<String>) {
            val application = SpringApplication(AppStarter::class.java)
            application.setAddCommandLineProperties(false)
            val defaultProperties = Properties()
            defaultProperties.put("spring.thymeleaf.mode", "LEGACYHTML5")
            application.setDefaultProperties(defaultProperties)
            application.run(*args)
        }
    }
}


